package cn.edu.hncj.controller;

import cn.edu.hncj.annotation.MyPermission;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mr.ma
 * @since 2022/11/13 21:17
 **/
@RestController
@RequestMapping("/emp")
public class EmpController {
    @GetMapping("getTest")
    @MyPermission("list")
    public String getTest(){
        System.out.println("========getTest========");
        return "list";
    }

    @PostMapping("postTest")
    @MyPermission("save")
    public String postTest(){
        System.out.println("========postTest========");
        return "save";
    }
}
